home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1995 / MacHack 1995.toast / Presentations / Presentations ’91 / DAL Files / DALtool 6⁄6 (System 7.x) / DalDemo.h < prev    next >
Text File  |  1991-06-06  |  2KB  |  102 lines

  1. #define RSRC_BASE    1000
  2. #define NIL            0L
  3. #define MOVE_TO_FRONT    -1L
  4. #define REMOVE_ALL_EVENTS 0
  5.  
  6. #define APPLE_MENU_ID    1000
  7. #define FILE_MENU_ID    1001
  8. #define EDIT_MENU_ID    1002
  9.  
  10. #define ABOUT_ITEM    1
  11. #define ABOUT_ALERT    1000
  12. #define LOGON_DIALOG 1000
  13. #define ERROR_ALERT_ID 1002
  14.  
  15. #define NO_MBAR    RSRC_BASE
  16. #define NO_MENU    RSRC_BASE + 1
  17. #define NO_WIND RSRC_BASE + 3
  18. #define NO_MEMORY    RSRC_BASE + 4
  19.  
  20. #define OK_BUTTON        1
  21. #define CANCEL_BUTTON    2
  22.  
  23. #define LOGON_NODE    7
  24. #define LOGON_NAME    8
  25. #define LOGON_PSWD    9
  26.  
  27. #define NEW_ITEM    1
  28. #define CLOSE_ITEM     2
  29. #define MONITOR_ITEM    4
  30. #define QUIT_ITEM    6
  31.  
  32. #define UNDO_ITEM    1
  33. #define CUT_ITEM    3
  34. #define COPY_ITEM    4
  35. #define PASTE_ITEM    5
  36. #define CLEAR_ITEM    6
  37.  
  38. #define DRAG_THRESH    30
  39. #define WINDOW_HOME_LEFT    5
  40. #define WINDOW_HOME_TOP    45
  41. #define NEW_WINDOW_OFFSET    20
  42. #define SBarWidth    15
  43.  
  44. #define NIL_WINDOW  0
  45. #define DEMO_WINDOW    1
  46. #define DA_WINDOW    2
  47. #define UNKNOWN_WINDOW    3
  48.  
  49. #define MIN_SLEEP    0L
  50. #define NIL_MOUSE_REGION    0L
  51.  
  52. #define LEAVE_WHERE_IT_IS    FALSE
  53.  
  54. #define TE_ENTER_KEY    0x03
  55. #define TE_TAB_CHAR        0x09
  56. #define TE_CARRIAGE_RETURN    0x0d
  57. #define TE_LEFT_ARROW    0x1c
  58. #define TE_RIGHT_ARROW    0x1d
  59. #define TE_UP_ARROW        0x1e
  60. #define TE_DOWN_ARROW    0x1f
  61. #define TE_BS_KEY        0x08
  62. #define TE_INPUT_AREA    0
  63. #define TE_OUTPUT_AREA    1
  64.  
  65. #define DAL_MONITOR_INTERVAL    120
  66. #define DAL_MAXCOL    50
  67.  
  68. #define WNE_TRAP_NUM    0x60
  69. #define UNIMPL_TRAP_NUM    0x9f
  70.  
  71. #define SUSPEND_RESUME_BIT    0x0001
  72. #define RESUMING 1
  73.  
  74. #define NIL_STR    "\p"
  75. #define FATAL_STR    "\pThat's all she wrote!"
  76.  
  77. /* Macros */
  78. #define TopLeft(aRect) (* (Point *) &(aRect.top))
  79. #define BotRight(aRect) (* (Point *) &(aRect.bottom))
  80.  
  81. /* Type definitions */
  82. typedef struct
  83. {
  84.     WindowRecord    wind;
  85.     int                wType;
  86.     ControlHandle    vScroll, vInScroll, vOutScroll;
  87.     TEHandle        inputTE, outputTE, curTE;
  88. } demoRecord, *demoPeek;
  89.  
  90. /* Function headers */
  91. pascal Boolean SignonFilter();
  92. pascal Boolean NewClikLoop();
  93. void CommonAction(ControlHandle,short *);
  94. void TurnOffTextArea(demoPeek ,int);
  95. void TurnOnTextArea(demoPeek ,int);
  96. void SwitchToNewArea(demoPeek);
  97. void DALReadLink(demoPeek);
  98. void DALDisplayState(demoPeek);
  99. void DALDisplayRow(demoPeek, Ptr *, int);
  100. void DALErrorHandler(demoPeek, int);
  101.  
  102.